An Improved LALR(k) Parser Generation for Regular Right Part Grammars
نویسندگان
چکیده
A regular right part grammar (RRPG) is a context-free grammar, in which right parts of productions are finite automata to extend the descriptive power of context-free grammar by including notations for describing repetitions and alternations [6,8]. On LR parsing of RRPGs, extra work is required to identify the left end of a handle at reduction time because a nonterminal can derive potentially infinite number of strings via a single production. For parsing RRPGs, some methods such as grammar transformation from RRPGs to LR(k) context-flee grammars [5,8], augmenting LR(0) automaton with readback machines to recognize the reverse of state sequences leading to a reduction [2,6,7], and stacking an LR state only when the symbol being processed indicates the beginning of a new right part [11], are suggested. In stacking method, the parser is efficient because exactly one state entry is popped from the stack when the right end of a production is found. However, if stacking conflicts occur, the transfor-
منابع مشابه
A Bounded Graph-Connect Construction for LR-regular Parsers
Parser generation tools currently used for computer language analysis rely on user wisdom in order to resolve grammar conflicts. Here practical LR(0)-based parser generation is introduced, with automatic conflict resolution by potentially-unbounded lookahead exploration. The underlying LR(0)-automaton item dependence graph is used for lookahead DFA construction. A bounded graph-connect techniqu...
متن کاملEine Rekonstruktion der LR-Theorie zur Elimination von Redundanz mit Anwendung auf den Bau von ELR-Parsern
In this thesis, we present work on two problems from the field of LR parser construction, a family of syntax analysis techniques for context-free languages. In the first part, we show that the traditional LR parser construction technique produces parsers which are burdened with a substantial amount of systematic redundance. We develop a new and well-founded method which defines what we call gen...
متن کامل- 1 - Foundations of Fast Communication via XML
Communication with XML often involves pre-agreed document types. In this paper, we propose an offline parser generation approach to enhance online processing performance for documents conforming to a given DTD. Our examination of DTDs and the languages they define demonstrates the existence of ambiguities. We present an algorithm that maps DTDs to deterministic context-free grammars defining th...
متن کاملAn LALR Extension for DCGs in Dynamic Programming
We propose a parsing model for natural languages based on the concept of deenite clause grammar. Our work embodies in a common frame a dynamic programming construction developed for logical push-down automata, and techniques that restrict the computation to a useful part of the search space inspired by LALR parsing. Unlike preceding approaches, our proposal avoids backtracking in all cases, pro...
متن کاملSymbolic Lookaheads for Bottom-up Parsing
We present algorithms for the construction of LALR(1) parsing tables, and of LR(1) parsing tables of reduced size. We first define specialized characteristic automata whose states are parametric w.r.t. variables symbolically representing lookahead-sets. The propagation flow of lookaheads is kept in the form of a system of recursive equations, which is resolved to obtain the concrete LALR(1) tab...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Inf. Process. Lett.
دوره 47 شماره
صفحات -
تاریخ انتشار 1993